package org.javabasics.collection;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * Created by LUOLIANG on 2016/8/29.
 */
public class CollectionTools {
    public static void main(String[] args) {
        List list = new ArrayList();

        list.add(23);
        list.add(234);
        list.add(-234);
        list.add(34);
        list.add(4);

        System.out.println("初始：" + list);

        Collections.sort(list);

        System.out.println("排序后：" + list);

        Collections.reverse(list);

        System.out.println("反转后：" + list);

        Collections.shuffle(list);

        System.out.println("随机后：" + list);
    }
}
